#!/usr/bin/python3.8
# -*- coding: utf-8 -*-
# @Time    : 2021/3/3 16:21
# @Author  : zhaohexin
# @Email   : 1483643520@xxx.com
# @File    : Session.py
# @Software: PyCharm
# @FileDescription：链接数据库

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

from core.config import settings

engine = create_engine(settings.SQLALCHEMY_DATABASE_URL, pool_pre_ping=True)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
